import { Request } from '@/utils/request';


export function addPd (data: any)  {
    return Request.axiosInstance({
        url: '/process/diagram',
        method: 'post',
        data
    })
}

export function findPdById (id: any)  {
    return Request.axiosInstance({
        url: '/process/diagram/' + id,
        //url: '/process/diagram/graphId' + id,
        method: 'get'
    })
}

export function findGraphById (id: any)  {
    return Request.axiosInstance({
        //url: '/process/diagram/' + id,
        url: '/process/diagram/graphId/' + id,
        method: 'get'
    })
}

export function list(query: any) {
    return Request.axiosInstance({
        url: '/process/main/list',
        method: 'get',
        params: query
    })
}

export function plcdatalist(query: any) {
    return Request.axiosInstance({
        url: '/process/diagram/plcdatas/'+ query,
        method: 'get',
        params: query
    })
}


export function plcdatalistByGraphId(query: any) {
    return Request.axiosInstance({
        url: '/process/diagram/plcdatas/graphid',
        method: 'get',
        params: query
    })
}